﻿using System;
using System.Collections.Generic;

namespace GameLibrary
{
    public static class HashsetExtension
    {
        /// <summary>
        /// Add all items in additional to set.
        /// </summary>
        /// <typeparam name="T"></typeparam>
        /// <param name="set"></param>
        /// <param name="additional"></param>
        public static void AddRange<T>(this HashSet<T> set, IEnumerable<T> additional)
        {
            foreach (var t in additional)
                set.Add(t);
        }
    }
}
